Skip to content

Add a Meeting Time distinct from the reservation window (#126) - #129

Open
pataniaeli wants to merge 1 commit into
devfrom
feat/issue-126-meeting-time
Open

pataniaeli wants to merge 1 commit into
devfrom
feat/issue-126-meeting-time

Conversation

@pataniaeli

Copy link
Copy Markdown
Collaborator

Closes #126

A booking's start_time and end_time describe the reservation — the window the room is held for, which is what CSC is told. They are not when the body meets: a committee that books 6:00–9:00 to allow for setup still tells its members 6:30. Every member-facing surface reported the reservation window, so every one of them answered the wrong question.

The field

Meeting Time is a real time value on the tables that own functional times:

level table meaning
booking weekly_room_bookings the series' meeting time
occurrence weekly_room_occurrences per-week override of the series
session one_time_room_bookings that session's own
session tabling_sessions that session's own

bookings deliberately gets no column — it carries purpose, scope and visibility, and has never held a time.

Every column is nullable, and NULL means inherit, resolving in the end to start_time — the same convention weekly_room_occurrences already uses for room, time and status, and that #55 extended to purpose and hidden. Two things follow, both intended:

  • Nothing needs backfilling. A booking with no meeting time set reads as meeting when its reservation begins, which is the assumption the whole app made before the column existed.
  • No insert path can break. A NOT NULL column would have had to be supplied by six write paths across three booking types, and any one missed is a 500 in production.

The one cost: a weekly occurrence cannot say "this week, meet at the start time" while its series says otherwise. Setting it explicitly to the start time expresses the same thing, so it isn't worth the third state hidden needed.

lib/meeting-time.ts holds the precedence in one place — five callers apply it, and an inheritance rule applied inconsistently is worse than one that's wrong everywhere.

Where it shows up

  • Slack committee reminders now state the meeting time alone rather than the reservation window, as the issue asks — still introduced as when the body "meets", the colloquial reading. A series with no meeting time set reads as its start time, exactly as before.
  • My Rooms leads its cards, list rows and calendar entries with it, naming the reservation window only when the two differ, so the cards keep the height Booking cards enhancements #78 settled on. The detail modal shows both rows always — it's the one place someone comes to find out exactly what was booked.
  • Both booking emails carry it. The created email prints "· meets 6:30 PM" per session only when it differs, so a semester of identical suffixes isn't manufactured.
  • occurrenceMoved counts it, so a week whose only edit was to move when it meets is reported to its members rather than changing silently.

Editing

Every create and edit form gets a Meeting Time picker, pre-filled from the start time rather than sitting blank — an empty box invites retyping the start time by hand. meetingTimeForStorage collapses a value equal to the start time back to NULL on save, so the two stay tied together until someone genuinely separates them; move the reservation later and the booking doesn't keep claiming an old time. That collapse is deliberately not applied to a weekly occurrence's override, where NULL means "inherit the series" rather than "meet at the start time".

Verification

  • tsc --noEmit and eslint clean on every changed file (two findings in bookings-tab.tsx and edit-weekly-form.tsx are pre-existing on dev).
  • next build passes.
  • 21 assertions exercised against the real modules — the inheritance chain, storage collapse across the HH:MM/HH:MM:SS shape difference, formatReminder output, flattenMyRooms resolution for all three booking types, and occurrenceMoved — all pass. The reminder renders as *Sustainability Committee* meets tomorrow — Monday, September 21, 6:30 PM, with 6:00 PM and 9:00 PM absent.
  • All five changed PostgREST select strings run clean against the live schema.

Migration

supabase/migrations/20260915000000_meeting_time.sql, already applied to the live project as migration meeting_time — so the schema is ahead of main until this merges. Additive only: four nullable columns, no backfill, no constraints. Rollback at supabase/migrations/rollback/20260915_meeting_time_rollback.sql.

🤖 Generated with Claude Code

@pataniaeli pataniaeli added the enhancement New feature or request label Sep 16, 2026
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
chambers Ready Ready Preview Sep 16, 2026 8:43pm UTC

A booking's start and end times describe the reservation -- the window the room
is held for, which is what CSC is told. They are not when the body meets: a
committee that books 6:00-9:00 to allow for setup still tells its members 6:30.
Every member-facing surface reported the reservation window, so every one of
them answered the wrong question.

Meeting Time is a `time` on the tables that own functional times -- the weekly
series, its per-week occurrences, and one-time and tabling sessions. Nullable
everywhere, with NULL meaning inherit and resolving in the end to start_time,
the same convention weekly_room_occurrences already uses for room, time and
status. Nothing needs backfilling and no insert path can break: a booking with
no meeting time set reads exactly as it did before the column existed.

The Slack committee reminder now states the meeting time alone rather than the
reservation window, as the issue asks. My Rooms leads its cards, list rows and
calendar entries with it, naming the window only when the two differ so the
cards keep the height issue #78 settled on; the detail modal shows both, always.
Both booking emails carry it, and a week whose only edit was to move when it
meets now counts as moved, so its members are told.

Applied to the database as migration `meeting_time`; rollback script included.

Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a "Meeting Time" field

1 participant